package com.getword.mongodao;

import com.getword.domain.City;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface CityRepository extends MongoRepository<City, Long> {
    // 城市查询
    List<City> findCitiesByLevelAndParentIdOrderByFirst(Integer level, Integer parentId);

    // 查询父级城市
    City findCityById(Integer id);
}
